import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
export 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
export 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';

class BmapWidget extends StatelessWidget {
  const BmapWidget({
    super.key,
    required this.onBMFMapCreated,
    this.mapOptions,
  });
  final Function(BMFMapController) onBMFMapCreated;
  final BMFMapOptions? mapOptions;
  @override
  Widget build(BuildContext context) {
    return Platform.isIOS
        ? BMFMapWidget(
            onBMFMapCreated: onBMFMapCreated,
            mapOptions: mapOptions,
          )
        : BMFTextureMapWidget(
            onBMFMapCreated: onBMFMapCreated,
            mapOptions: mapOptions,
          );
  }
}
